﻿@model BsSetting
@{
    //todo...
    //特定角色或用户可以见
    var currentUrl = Request.Url.PathAndQuery;
    var bsSetting = Model;
    if (bsSetting == null)
    {
        bsSetting = this.GetBsSetting();
    }
    var innerContainerText = bsSetting.InsideContainer ? "自适应容器" : "固定容器";
    var responsiveText = bsSetting.Responsive ? "定宽" : "自适应宽";
    var allThemes = bsSetting.Themes;
    var allLayouts = bsSetting.Layouts;
}
<li>
    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
        设定主题
        &nbsp;
        <i class="ace-icon fa fa-angle-down bigger-110"></i>
    </a>
    <ul class="dropdown-menu dropdown-light-blue dropdown-caret">

        <li>
            @Html.RouteLink(innerContainerText, new { area = "Cloud", controller = "Setup", action = "BsSetting", insideContainer = !bsSetting.InsideContainer, returnUrl = currentUrl }, null)
        </li>

        <li>
            @Html.RouteLink(responsiveText, new { area = "Cloud", controller = "Setup", action = "BsSetting", responsive = !bsSetting.Responsive, returnUrl = currentUrl }, null)
        </li>

        <li class="divider"></li>

        @foreach (var layout in allLayouts)
        {

            if (layout.Name.NbEquals(bsSetting.Layout))
            {
                <li class="active">
                    @Html.RouteLink(layout.Name, new { area = "Cloud", controller = "Setup", action = "BsSetting", layout = layout.Name, returnUrl = currentUrl }, null)
                </li>
            }
            else
            {
                <li>
                    @Html.RouteLink(layout.Name, new { area = "Cloud", controller = "Setup", action = "BsSetting", layout = layout.Name, returnUrl = currentUrl }, null)
                </li>
            }
        }

        <li class="divider"></li>

        @foreach (var theme in allThemes)
        {
            if (theme.Name.NbEquals(bsSetting.Theme))
            {
                <li class="active">
                    @Html.RouteLink(theme.Name, new { area = "Cloud", controller = "Setup", action = "BsSetting", theme = theme.Name, returnUrl = currentUrl }, null)
                </li>
            }
            else
            {
                <li>
                    @Html.RouteLink(theme.Name, new { area = "Cloud", controller = "Setup", action = "BsSetting", theme = theme.Name, returnUrl = currentUrl }, null)
                </li>
            }
        }
    </ul>
<li>
